Post

Replies

Boosts

Views

Activity

Comment on WebKit: Where to Change WKBrowsingContextController to Fix Trimming of HTTP Body?
I simply need a way to inject a custom header into requests that are handled by a WKWebView. With NSSelectorFromString(@"registerSchemeForCustomProtocol:"), I can do that for all WebViews in my app, but it would be OK to have to set this interceptor for https scheme for each WebView separately. I really hate the idea of having to modify the HTML content of each WebView with some javascript only to replace the https scheme with some custom scheme (then, I can use the documented setURLSchemeHandler as @eskimo demonstrates in another thread).  Any hints?
Oct ’21